/**
 * Author: zhezhen.cheng
 * Creation Time: 2016/6/14.
 * Description:...
 */
define(['jquery','../../common/ajax/ajax','../v/noInser','../v/dhcp','../v/pppoe'],
    function($,ajax,noInser,dhcp,pppoe) {
        function example(){
            ajax({
                url:interfaces.get_wan_type.url,
                dataType:interfaces.get_wan_type.dataType,
                type:interfaces.get_wan_type.type,
                data:{},
                cache:{
                    use:false,
                    name:'',
                    time:10
                },
                isOk:function(data){
                    var datas = '';
                    if(useNetData){
                        datas = data;
                    }else{
                        datas = data.wan;
                    }
                    //0:  DHCP   1.PPPOE  -1未连接网线�����
                    if(datas.data.wan_type == 0){
                        dhcp(datas.data.wan_ip,datas.data.wan_mask,datas.data.wan_dns);
                    }else if(datas.data.wan_type == 1){
                        pppoe(datas.data.wan_pppoe_user,datas.data.wan_pppoe_password);
                    }else{
                        noInser();
                    }

                }
            });
        }
        return example;
    });